﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Enterprise/Master/AdminMaster.Master"
    AutoEventWireup="true" CodeBehind="ChildUserList.aspx.cs" Inherits="HZ.DrugTrade.Web.Enterprise.SystemManage.ChildUserList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">子用户列表</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblUserId" runat="server" Text="用户ID："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtUserId" runat="server"></asp:TextBox>
                            </td>
                            <asp:Literal ID="ltlAdvance" runat="server" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                            <td align="right">
                                <asp:Label ID="lblRoleName" runat="server" Text="是否启用："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlIsUsing" runat="server">
                                    <asp:ListItem Selected="True" Value="">(全部)</asp:ListItem>
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td colspan="2">
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblUserName" runat="server" Text="用户名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtChildUserName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblIsOnline" runat="server" Text="是否在线："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlIsOnline" runat="server">
                                    <asp:ListItem Selected="True" Value="">(全部)</asp:ListItem>
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                <asp:Label ID="Label2" runat="server" Text="最后登录："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtLoginFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    MaxLength="10" Width="62px"></asp:TextBox>
                                -
                                <asp:TextBox ID="txtLoginTo" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    MaxLength="10" Width="62px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="100px">
                    <hz:HzButton ID="btnQuery" runat="server" OnClick="btnQuery_Click" Text="查询" />
                    <hz:HzLinkButton ID="lbnSwitch" runat="server" CommandArgument="simple" OnClick="lbnSwitch_Click"
                        Text="高级查询"></hz:HzLinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwChildUserList" class="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="UserID" OnRowDataBound="gvwChildUserList_RowDataBound" EmptyDataText="暂无符合要求的数据！"
        OnRowCommand="gvwChildUserList_RowCommand" OnRowCancelingEdit="gvwUser_RowCancelingEdit"
        OnRowEditing="gvwChildUserList_RowEditing" OnRowUpdating="gvwChildUserList_RowUpdating">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UserID" HeaderText="用户ID" ReadOnly="true" />
            <asp:TemplateField HeaderText="用户名称">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUserName" runat="server" Text='<%# Bind("UserName") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="是否启用">
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# (bool)Eval("IsUsing")?"~/lib/images/ico_yes.gif":"~/lib/images/ico_no.gif"%>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        Text="更新" />
                    <hz:HzLinkButton ID="lbnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="取消" />
                </EditItemTemplate>
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnEdit" runat="server" CausesValidation="True" CommandName="Edit"
                        Text="编辑" />
                    |
                    <hz:HzLinkButton ID="lbnDel" runat="server" OnClientClick="if(!this.disabled){return  confirm('确认要删除此行信息吗？');}else{return false;}"
                        CommandName="Del" CommandArgument='<%#Eval("UserID") %>' Text="删除" />
                    | <a href='ChildUserOperate.aspx?uid=<%#Eval("UserID")%> '>权限设置</a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText=" ">
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="addTable_chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwChildUserList','addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="chkChildUser" id="chkChildUser" value='<%#Eval("UserID")%>'
                        onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwChildUserList','addTable_chkAll');" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>说明:<span> 说明</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAddChildUser" runat="server" Text="添加子用户" ToolTip="添加子用户" OnClick="btnAddChildUser_Click"
            CssClass="btn" />
        <hz:HzButton ID="btnBatLock" runat="server" Text="批量锁定" ToolTip="批量锁定用户" OnClick="btnBatLock_Click"
            OnClientClick="if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwChildUserList','请至少选定一个用户！')) {return confirm('确实要批量锁定选定用户？');}return false;"
            CssClass="btn" />
        <hz:HzButton ID="btnBatUnLock" runat="server" Text="批量解锁" ToolTip="批量解锁用户" OnClick="btnBatUnLock_Click"
            OnClientClick="if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwChildUserList','请至少选定一个用户！')) {return confirm('确实要批量解锁选定用户？');}return false;"
            CssClass="btn" />
        <hz:HzButton ID="btnBatResetPws" runat="server" OnClick="btnBatResetPws_Click" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwChildUserList','请至少选定一个用户！')) {return confirm('确实要初始化选定用户密码？');}return false;"
            Text="初始化密码" ToolTip="初始化用户密码" CssClass="btn" />
    </div>
</asp:Content>
